const path = require('path'); // 使用node.js中的path模块

module.exports = {
	entry: "./src/index.tsx",
	devtool: "source-map",
	output: {
		filename: "bundle.js",
		path: path.resolve(__dirname, 'dist')
	},
	resolve: {
		extensions: [".ts", ".tsx", ".js", ".jsx"]
	},
	module: {
		rules: [{
			test: /\.tsx?$/,
			loader: "ts-loader"
		}]
	}
}